<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="primus" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="fn" tagdir="/WEB-INF/tags/form" %>
<primus:page title="新增拦截管理">
    <jsp:attribute name="css">
        <style type="text/css">
            #table .operate {
                min-width: 80px;
            }
        </style>
    </jsp:attribute>
    <jsp:attribute name="script">
        <script type="application/javascript">
            $(function () {
                $("#table").DataTable({
                    "lengthMenu": [[10, 20, 50, -1], [10, 20, 50, "所有"]],
                    "columnDefs": [{"targets": [7], "orderable": false}],
                    "searching": false,
                    "order": [[0, "asc"]]
                });
            });
            $("body").on("click", ".geo-line", function () {
                var id = $(this).data("id");
            })
        </script>
    </jsp:attribute>
    <jsp:body>
        <div class="breadcrumbs ace-save-state" id="breadcrumbs">
            <ul class="breadcrumb">
                <li>
                    <i class="ace-icon fa fa-home home-icon"></i>
                    <a href="welcome.do">
                        首页
                    </a>
                </li>
                <li>
                    <a href="geo/provinces">
                        订单管理
                    </a>
                </li>
                <li class="active">
                    新增拦截管理
                </li>
            </ul>
        </div>

        <div class="page-content">

            <div class="row">
                <div class="col-xs-12">
                    <!-- PAGE CONTENT BEGINS -->
                    <div class="row">
                        <div class="col-xs-12">
                            <h3 class="header smaller lighter blue">
                                订单拦截
                            </h3>
                            <div class="row">
                                <div class="tabbable" style="float:right">
                                    <button class="btn btn-white btn-default btn-round closeButton">
                                        <i class="ace-icon fa fa-times red2" style="padding:0;margin:0;float:left;box-sizing:border-box;"></i>
                                        关闭
                                    </button>
                                </div>
                                <div class="tabbable" style="width: 100%; height: 100%; display: inline-table;">
                                    <div class="row">
                                        <div class="form-group">
                                            <label class="control-label col-xs-12 col-sm-3 no-padding-right">拦截类型</label>
                                            <div class="col-xs-12 col-sm-9">
                                                <select id="u3498_input">
                                                    <option value="全部订单">全部订单</option>
                                                    <option value="立即送订单">立即送订单</option>
                                                    <option value="普通送订单">普通送订单</option>
                                                    <option value="预约送订单">预约送订单</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <br>
                                    <br>
                                    <div class="row">
                                        <div class="form-group">
                                            <label class="control-label col-xs-12 col-sm-3 no-padding-right">属性名</label>
                                            <div class="col-xs-12 col-sm-9">
                                                <select id="u3501_input">
                                                    <option selected="" value="订单总金额">订单总金额</option>
                                                    <option value="商品编码">商品编码</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <br>
                                    <br>
                                    <div class="row" style="text-align:center">
                                        <div style="margin: 0 auto">
                                            <button class="btn btn-primary" id="addLineButton">
                                                添加
                                            </button>
                                        </div>
                                    </div>
                                    <hr>
                                    <br>
                                    <br>
                                    <div id="showLine" style="text-align:center">
                                        <div class="row">
                                            <div class="col-sm-10">
                                                <label class="col-sm-4 control-label no-padding-right" >属性名</label>
                                                <input type="text" class="col-xs-8 col-sm-8" />
                                            </div>
                                        </div>
                                        <br>
                                        <br>
                                        <div class="row">
                                            <div class="col-sm-10">
                                                <label class="col-sm-4 control-label no-padding-right" >属性值</label>
                                                <input type="text" class="col-xs-8 col-sm-8" />
                                            </div>
                                        </div>
                                        <br>
                                        <br>
                                        <div class="row">
                                            <div class="col-sm-10">
                                                <label class="col-sm-4 control-label no-padding-right" >操作</label>
                                                <input type="text" class="col-xs-8 col-sm-8" />
                                            </div>
                                        </div>
                                        <br>
                                        <br>
                                        <div style="margin: 0 auto">
                                            <button class="btn btn-primary closeButton">
                                                返回
                                            </button>
                                            <button class="btn btn-primary" id="agreeButton">
                                                保存
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        </div>

        <script>
            $(function(){

                $("#li1").click();
                var vc = sessionStorage.getItem('sendOperation'); // => 返回testKey对应的值
                $("#showLine").hide();
//                $("#showLine").hide();
//                $.ajax({
//                    url:"/dispatch/detailsData",
//                    data:{
//                        "code": row1.code
//                    },
//                    async:false,//取消异步请求
//                    dataType:"JSON",
//                    success:function (data) {
//                        row1 = data;
//                    }
//                });

//                GetRequest(row1);


            });

            // 关闭按钮(跳转回派单列表页面)
            $(".closeButton").on("click", function () {
                window.location.href="/interception.do";
            });

            // 添加按钮
            $("#addLineButton").on("click", function () {
                $("#showLine").show();
            });

            // 获取session 存储的值
            function GetRequest(row) {
                con_inf_value(row.consignee);    //收货人信息赋值
            }

        </script>
    </jsp:body>
</primus:page>